package BC132_KiKi算期末成绩;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n1 = sc.nextInt();
        int n2 = sc.nextInt();
        int n3 = sc.nextInt();
        int n4 = sc.nextInt();

        double n = n1 * 0.2 + n2 * 0.1 + n3 * 0.2 + n4 * 0.5;
        System.out.println(n);
    }
}
